package com.kurt.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;

/**
 * 驾驶员扩展表
 * 存储驾驶员的其他信息，如生日、地址、紧急联系人等
 * 与sys_driver表一对一关联
 */
@Data
@Entity
@Table(name = "sys_driver_extension")
@EqualsAndHashCode(callSuper = true)
public class SysDriverExtension extends BaseEntity {

    @Id
    @Column(name = "id")
    private Long id; // 驾驶员ID，与sys_driver.id一致

    @Column(name = "birthday")
    private LocalDate birthday; // 生日

    @Column(name = "address", length = 255)
    private String address; // 地址

    @Column(name = "emergency_contact", length = 50)
    private String emergencyContact; // 紧急联系人

    @Column(name = "emergency_phone", length = 20)
    private String emergencyPhone; // 紧急联系电话

}
